#!/usr/bin/env python
#-*- coding:utf-8 -*-

# file:test.py
# author:ytytyt
# datetime:2022/6/2 21:14
# software: PyCharm
'''
this is functiondescription
'''
# import module your need
from itsdangerous import TimedJSONWebSignatureSerializer as Serializer
import time
s = Serializer("hahahaha")
token = s.dumps({'id':'12345'}).decode('utf-8')

try:
    time.sleep(3)
    data = s.loads(token.encode('utf-8'))
except Exception as e:
    print(e)
else:
    print(data.get('id')) #12345